<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <link rel="stylesheet" type="text/css" href="../../css/bui/bui.css">
    <link rel="stylesheet" type="text/css" href="../../css/api.css">
    <link rel="stylesheet" type="text/css" href="../../css/main.css">
    <style media="screen">
        body {
            background-color: #0D0B35;
            position: relative;
        }

        .bg {
            position: absolute;
            width: 100%;
        }

        [v-cloak] {
            display: none;
        }

        .title {
            width: 100%;
            height: 1rem;
            line-height: 1rem;
            text-align: center;
            color: white;
            position: relative;
            font-size: 0.36rem;
        }

        .title img {
            position: absolute;
            left: 0.3rem;
            top: 50%;
            margin-top: -0.3rem;
            width: 0.6rem;
            height: 0.6rem;
        }

        .main {
            display: flex;
            flex-direction: column;
            border-radius: 0.2rem;
            color: white;
            margin: 0 0.3rem;
            font-size: 0.29rem;
        }

        .item{
          width: 100%;
          height: 1.76rem;
          padding:  0.3rem;
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          border-bottom: 1px solid #064CA0;
        }

        .item .top{
          display: flex;
          justify-content: space-between;
        }

        .time {
            text-align: right;
            font-size: 0.24rem;
            margin-top: 0.2rem;
            font-family: Source Han Sans CN;
            font-weight: 400;
            color: rgba(186, 202, 204, 1);
        }
    </style>
</head>

<body>
    <div id="app" class="chat-page">
        <div class="title">
            <img src="../../image/default/back.png" @click=back() alt="">消息详情
        </div>
        <div class="main">
            <div class="item" @click=openmessageDetail()>
              <div class="top">
                <div class="tip">[系统消息]</div>
                <div class="time">2020-02-11 14 : 55 : 53</div>
              </div>
              <div class="bot">
                <div class="dtitle">系统通知</div>
              </div>
            </div>
            <div class="item" @click=openmessageDetail()>
              <div class="top">
                <div class="tip">[系统消息]</div>
                <div class="time">2020-01-30 14 : 55 : 53</div>
              </div>
              <div class="bot">
                <div class="dtitle">公链DAPP系统公告</div>
              </div>
            </div>
        </div>

    </div>
</body>
<script src="../../script/jquery.js"></script>
<script src="../../script/bui.js"></script>
<script src="../../script/vue.js"></script>
<!-- <script src="../script/common.js"></script> -->
<!-- <script src="../script/md5-min.js"></script> -->
<!-- <script src="../script/fastclick.js"></script> -->
<script src="../../script/api/api.js"></script>

<script type="text/javascript">
    var _vue = '';
    apiready = function() {
        init_bui();
        // initBook();
        // listContact.hide();
        // openframe();

    }

    function openframe() {
        api.openFrame({
            name: 'chat_page',
            url: 'popup.html',
            rect: {
                x: 0,
                y: 0,
                w: 'auto',
                h: 'auto'
            },
            bounces: false,
            pageParam: {
                name: 'test'
            },
            bgColor: 'transparent',
            vScrollBarEnabled: false,
            hScrollBarEnabled: false
        }, function(ret, err) {
            if (ret) {
                // console.log(ret)
            }
        });
    }

    function init_bui() {
        _vue = new Vue({
            el: '#app',
            data: {
                adress: '0x708a00738ddcbal6ee7b7883f2b81070ddb370f3'
            },
            mounted() {

            },
            methods: {
                back() {
                    api.historyBack({}, function(ret, err) {
                        if (!ret.status) {
                            api.closeWin();
                        }
                    });
                },
                openmessageDetail() {
                  api.openWin({
                      name: 'messageDetail',
                      url: '../messageDetail/index.html',
                      bounces: false,
                      pageParam: {
                          name: 'test'
                      },
                  }, function(ret, err) {
                      if (ret) {
                          // console.log(ret)
                      }
                  });
                },
            },
        });
        api.setCustomRefreshHeaderInfo({
            bgColor: '#0D0B35',
            image: {
                pull: 'widget://image/pullrefresh/pull.png',
                transform: [
                    'widget://image/pullrefresh/pull_end_image_frame_01.png',
                    'widget://image/pullrefresh/pull_end_image_frame_02.png',
                    'widget://image/pullrefresh/pull_end_image_frame_03.png',
                    'widget://image/pullrefresh/pull_end_image_frame_04.png',
                    'widget://image/pullrefresh/pull_end_image_frame_05.png'
                ],
                load: [
                    'widget://image/pullrefresh/refreshing_image_frame_01.png',
                    'widget://image/pullrefresh/refreshing_image_frame_02.png',
                    'widget://image/pullrefresh/refreshing_image_frame_03.png',
                    'widget://image/pullrefresh/refreshing_image_frame_04.png',
                    'widget://image/pullrefresh/refreshing_image_frame_05.png',
                    'widget://image/pullrefresh/refreshing_image_frame_06.png'
                ]
            }
        }, function() {
            //下拉刷新被触发，自动进入加载状态，使用 api.refreshHeaderLoadDone() 手动结束加载中状态
            setTimeout(function() {
                api.refreshHeaderLoadDone()
            }, 1000);
        });
    }
</script>

</html>
